package com.pro.service.imple;/*
    @description: TDD
    @author: 赵自强
    @date: 2022/1/20 18:44
*/

import com.pro.mapper.AdvertisementMapper;
import com.pro.pojo.JsCarousel;
import com.pro.service.AdvertisementService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdvertisementServiceImple implements AdvertisementService {


    @Autowired
    private AdvertisementMapper advertisementMapper;
    /*
     * create by: 赵自强
     * create time: 2022/1/20 18:46
     * @return com.pro.pojo.JsonData
     * 获取轮播图列表||检索 getRotationCharts JsCarousel jsCarousel
     */
    @Override
    public List<JsCarousel> getRotationCharts(JsCarousel jsCarousel) {
        return advertisementMapper.getRotationCharts(jsCarousel);
    }
    /*
     * create by: 赵自强
     * create time: 2022/1/20 19:22
     * @return com.pro.pojo.JsonData
     * 删除轮播图 delRotationChart Integer carouselId
     */
    @Override
    public Boolean delRotationChart(Integer carouselId) {
        return advertisementMapper.delRotationChart(carouselId);
    }
    /*
     * create by: 赵自强
     * create time: 2022/1/21 19:24
     * @return
     * 编辑轮播图 editRotationChart JsCarousel jsCarousel
     */
    @Override
    public Boolean editRotationChart(JsCarousel jsCarousel) {
        return advertisementMapper.editRotationChart(jsCarousel);
    }
    /*
     * create by: 赵自强
     * create time: 2022/1/21 20:43
     * @return com.pro.pojo.JsonData
     * 添加轮播图 addAdvertisement JsCarousel jsCarousel
     */
    @Override
    public Boolean addAdvertisement(JsCarousel jsCarousel) {
        return advertisementMapper.addAdvertisement(jsCarousel);
    }
}
